python3.9.git
2 weeks agobpo-42988: Remove the pydoc getfile feature (GH-25015)
Miss Islington (bot) [Mon, 29 Mar 2021 13:08:00 +0000 (06:08 -0700)]
bpo-42988: Remove the pydoc getfile feature (GH-25015)

CVE-2021-3426: Remove the "getfile" feature of the pydoc module which
could be abused to read arbitrary files on the disk (directory
traversal vulnerability). Moreover, even source code of Python
modules can contain sensitive data like passwords. Vulnerability
reported by David Schwörer.
(cherry picked from commit 9b999479c0022edfc9835a8a1f06e046f3881048)

Co-authored-by: Victor Stinner <vstinner@python.org>
Gbp-Pq: Name 0003-bpo-42988-Remove-the-pydoc-getfile-feature-GH-25015.patch

2 weeks ago[3.9] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96502)
Gregory P. Smith [Mon, 5 Sep 2022 09:21:03 +0000 (02:21 -0700)]
[3.9] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96502)

* Correctly pre-check for int-to-str conversion (#96537)

Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} < \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$
So
$$2^{L(s-1)} > 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Gbp-Pq: Name 0002-3.9-gh-95778-CVE-2020-10735-Prevent-DoS-by-very-larg.patch

2 weeks ago[3.9] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993...
Miss Islington (bot) [Tue, 11 Oct 2022 21:13:18 +0000 (14:13 -0700)]
[3.9] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) (#98190)

gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993)
(cherry picked from commit b9509ba7a9c668b984dab876c7926fe1dc5aa0ba)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Gbp-Pq: Name 0001-3.9-gh-68966-Make-mailcap-refuse-to-match-unsafe-fil.patch

2 weeks agompdecimal-2.5.1
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
mpdecimal-2.5.1

Gbp-Pq: Name mpdecimal-2.5.1.diff

2 weeks agosphinx3
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
sphinx3

Gbp-Pq: Name sphinx3.diff

2 weeks agohurd_kfreebsd_thread_native_id
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
hurd_kfreebsd_thread_native_id

Gbp-Pq: Name hurd_kfreebsd_thread_native_id.diff

2 weeks agosysconfigdata-name
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
sysconfigdata-name

Gbp-Pq: Name sysconfigdata-name.diff

2 weeks agoUse aligned access for _sha3 module on ARM.
Dave Jones [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
Use aligned access for _sha3 module on ARM.

Gbp-Pq: Name arm-alignment.diff

2 weeks agoargparse-no-shutil
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
argparse-no-shutil

Gbp-Pq: Name argparse-no-shutil.diff

2 weeks agobuild-math-object
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
build-math-object

Gbp-Pq: Name build-math-object.diff

2 weeks agoAdd the option to build Texinfo-format documentation.
Benjamin Moody [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
Add the option to build Texinfo-format documentation.

Bug-Debian: https://bugs.debian.org/881959
Last-Update: 2017-11-27

Gbp-Pq: Name doc-build-texinfo.diff

2 weeks agolocal-doc-references
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
local-doc-references

Gbp-Pq: Name local-doc-references.diff

2 weeks agopydoc-use-pager
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
pydoc-use-pager

# DP: pydoc: use the pager command if available.

# DP: pydoc: use the pager command if available.

Gbp-Pq: Name pydoc-use-pager.diff

2 weeks agoreproducible-buildinfo
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
reproducible-buildinfo

# DP: Build getbuildinfo.o with DATE/TIME values when defined

# DP: Build getbuildinfo.o with DATE/TIME values when defined

Gbp-Pq: Name reproducible-buildinfo.diff

2 weeks agomangle-fstack-protector
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
mangle-fstack-protector

# DP: When using GCC versions older than 4.9, automagically mangle
# DP: -fstack-protector-strong to -fstack-protector

# DP: When using GCC versions older than 4.9, automagically mangle
# DP: -fstack-protector-strong to -fstack-protector

Gbp-Pq: Name mangle-fstack-protector.diff

2 weeks agoensurepip-disabled
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
ensurepip-disabled

# DP: Disable ensurepip for the system installation, only enable it for virtual environments.

# DP: Disable ensurepip for the system installation, only enable it for virtual environments.

Gbp-Pq: Name ensurepip-disabled.diff

2 weeks agoensurepip-wheels
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
ensurepip-wheels

Gbp-Pq: Name ensurepip-wheels.diff

2 weeks agodisable-some-tests
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
disable-some-tests

# DP: Disable some failing tests we are not interested in

# DP: Disable some failing tests we are not interested in

Gbp-Pq: Name disable-some-tests.diff

2 weeks agotempfile-minimal
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
tempfile-minimal

# DP: Avoid shutil import when it is not available.

# DP: Avoid shutil import when it is not available.

Gbp-Pq: Name tempfile-minimal.diff

2 weeks agomultiarch-extname
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
multiarch-extname

# DP: Make sure to rename extensions to a tag including the MULTIARCH name

# DP: Make sure to rename extensions to a tag including the MULTIARCH name

this patch can be dropped for python3.5 final, if the upstream chage is kept.

Gbp-Pq: Name multiarch-extname.diff

2 weeks agotest-no-random-order
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
test-no-random-order

# DP: Don't run the test suite in random order.

# DP: Don't run the test suite in random order.

Gbp-Pq: Name test-no-random-order.diff

2 weeks agoext-no-libpython-link
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
ext-no-libpython-link

# DP: Don't link extensions with the shared libpython library.

# DP: Don't link extensions with the shared libpython library.

Gbp-Pq: Name ext-no-libpython-link.diff

2 weeks agolib2to3-no-pickled-grammar
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
lib2to3-no-pickled-grammar

Gbp-Pq: Name lib2to3-no-pickled-grammar.diff

2 weeks agomultiarch
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
multiarch

Gbp-Pq: Name multiarch.diff

2 weeks agoctypes-arm
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
ctypes-arm

Gbp-Pq: Name ctypes-arm.diff

2 weeks agolib-argparse
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
lib-argparse

# DP: argparse.py: Make the gettext import conditional

# DP: argparse.py: Make the gettext import conditional

Gbp-Pq: Name lib-argparse.diff

2 weeks agodisable-sem-check
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
disable-sem-check

# DP: Assume working semaphores, don't rely on running kernel for the check.

# DP: Assume working semaphores, don't rely on running kernel for the check.

Gbp-Pq: Name disable-sem-check.diff

2 weeks agolangpack-gettext
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
langpack-gettext

# DP: Description: support alternative gettext tree in
# DP: /usr/share/locale-langpack; if a file is present in both trees,
# DP: prefer the newer one
# DP: Upstream status: Ubuntu-Specific

# DP: Description: support alternative gettext tree in
# DP: /usr/share/locale-langpack; if a file is present in both trees,
# DP: prefer the newer one
# DP: Upstream status: Ubuntu-Specific

Gbp-Pq: Name langpack-gettext.diff

2 weeks agoprofiled-build
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
profiled-build

# DP: Ignore errors in the profile task.

# DP: Ignore errors in the profile task.

Gbp-Pq: Name profiled-build.diff

2 weeks agobdist-wininst-notfound
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
bdist-wininst-notfound

# DP: suggest installation of the pythonX.Y-dev package, if bdist_wininst
# DP: cannot find the wininst-* files.

# DP: suggest installation of the pythonX.Y-dev package, if bdist_wininst
# DP: cannot find the wininst-* files.

Gbp-Pq: Name bdist-wininst-notfound.diff

2 weeks agosetup-modules
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
setup-modules

Gbp-Pq: Name setup-modules.diff

2 weeks agolink-opt
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
link-opt

# DP: Call the linker with -O1 -Bsymbolic-functions

# DP: Call the linker with -O1 -Bsymbolic-functions

Gbp-Pq: Name link-opt.diff

2 weeks agogdbm-import
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
gdbm-import

# DP: suggest installation of python3-gdbm package on failing _gdbm import

# DP: suggest installation of python3-gdbm package on failing _gdbm import

Gbp-Pq: Name gdbm-import.diff

2 weeks agotkinter-import
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
tkinter-import

# DP: suggest installation of python-tk package on failing _tkinter import

# DP: suggest installation of python-tk package on failing _tkinter import

Gbp-Pq: Name tkinter-import.diff

2 weeks agodistutils-sysconfig-2
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
distutils-sysconfig-2

Gbp-Pq: Name distutils-sysconfig-2.diff

2 weeks agodistutils-sysconfig
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
distutils-sysconfig

# DP: Get CONFIGURE_CFLAGS, CONFIGURE_CPPFLAGS, CONFIGURE_LDFLAGS from
# DP: the python build, when CFLAGS, CPPFLAGS, LDSHARED) are not set
# DP: in the environment.

# DP: Get CONFIGURE_CFLAGS, CONFIGURE_CPPFLAGS, CONFIGURE_LDFLAGS from
# DP: the python build, when CFLAGS, CPPFLAGS, LDSHARED) are not set
# DP: in the environment.

Gbp-Pq: Name distutils-sysconfig.diff

2 weeks agodistutils-link
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
distutils-link

# DP: Don't add standard library dirs to library_dirs and runtime_library_dirs.

# DP: Don't add standard library dirs to library_dirs and runtime_library_dirs.

Gbp-Pq: Name distutils-link.diff

2 weeks agolocale-module
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
locale-module

# DP:   * Lib/locale.py:
# DP:     - Don't map 'utf8', 'utf-8' to 'utf', which is not a known encoding
# DP:       for glibc.

# DP:   * Lib/locale.py:
# DP:     - Don't map 'utf8', 'utf-8' to 'utf', which is not a known encoding
# DP:       for glibc.

Gbp-Pq: Name locale-module.diff

2 weeks agodistutils-install-layout
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
distutils-install-layout

# DP: distutils: Add an option --install-layout=deb, which
# DP: - installs into $prefix/dist-packages instead of $prefix/site-packages.
# DP: - doesn't encode the python version into the egg name.

# DP: distutils: Add an option --install-layout=deb, which
# DP: - installs into $prefix/dist-packages instead of $prefix/site-packages.
# DP: - doesn't encode the python version into the egg name.

Gbp-Pq: Name distutils-install-layout.diff

2 weeks agodeb-locations
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
deb-locations

# DP: adjust locations of directories to debian policy

# DP: adjust locations of directories to debian policy

Gbp-Pq: Name deb-locations.diff

2 weeks agodeb-setup
Matthias Klose [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
deb-setup

# DP: Don't include /usr/local/include and /usr/local/lib as gcc search paths

# DP: Don't include /usr/local/include and /usr/local/lib as gcc search paths

Gbp-Pq: Name deb-setup.diff

2 weeks agopython3.9 (3.9.2-1+deb11u6) bullseye-security; urgency=medium
Arnaud Rebillout [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
python3.9 (3.9.2-1+deb11u6) bullseye-security; urgency=medium

  * Revert fixes for CVE-2025-15366 and CVE-2025-15367. It was found that
    those changes break backward compatibility, and upstream didn't backport
    it to any branch. More details can be found in discussions on the upstream
    bugtracker (issues and merge requests).
  * Apply upstream patch for the following CVE:
    - CVE-2026-6100: Use-after-free (UAF) was possible in the
      `lzma.LZMADecompressor` and `bz2.BZ2Decompressor` when a memory
      allocation fails with a `MemoryError` and the decompression instance is
      re-used. This scenario can be triggered if the process is under memory
      pressure.

[dgit import unpatched python3.9 3.9.2-1+deb11u6]

2 weeks agoImport python3.9_3.9.2-1+deb11u6.debian.tar.xz
Arnaud Rebillout [Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)]
Import python3.9_3.9.2-1+deb11u6.debian.tar.xz

[dgit import tarball python3.9 3.9.2-1+deb11u6 python3.9_3.9.2-1+deb11u6.debian.tar.xz]

5 years agoImport python3.9_3.9.2.orig.tar.xz
Matthias Klose [Sun, 28 Feb 2021 17:03:44 +0000 (18:03 +0100)]
Import python3.9_3.9.2.orig.tar.xz

[dgit import orig python3.9_3.9.2.orig.tar.xz]